var max = 1320;
var min = 820;
option = {
  backgroundColor: '#1B458A',
  textColor: '#8DA2C4',
  xAxis: {

    axisLine: {
      lineStyle: {
        color: '#8DA2C4' //坐标轴线颜色
      }
    },
    axisLabel: {
      textStyle: {
        color: '#8DA2C4'
      }
    },

    type: 'category',
    boundaryGap: false,
    data: ['00:00', '00:15', '00:30', '00:45',
      '01:00', '01:15', '01:30', '01:45',
      '02:00', '02:15', '02:30', '02:45',
      '03:00', '03:15', '03:30', '03:45',
      '04:00', '04:15', '04:30', '04:45',
      '05:00', '05:15', '05:30', '05:45',
      '06:00', '06:15', '06:30', '06:45',
      '07:00', '07:15', '07:30', '07:45',
      '08:00', '08:15', '08:30', '08:45',
      '09:00', '09:15', '09:30', '09:45',
      '10:00', '10:15', '10:30', '10:45',
      '11:00', '11:15', '11:30', '11:45',
      '12:00', '12:15', '12:30', '12:45',
      '13:00', '13:15', '13:30', '13:45',
      '14:00', '14:15', '14:30', '14:45',
      '15:00', '15:15', '15:30', '15:45',
      '16:00', '16:15', '16:30', '16:45',
      '17:00', '17:15', '17:30', '17:45',
      '18:00', '18:15', '18:30', '18:45',
      '19:00', '19:15', '19:30', '19:45',
      '20:00', '20:15', '20:30', '20:45',
      '21:00', '21:15', '21:30', '21:45',
      '22:00', '22:15', '22:30', '22:45',
      '23:00', '23:15', '23:30', '23:45',
    ]
  },
  tooltip: {
    trigger: 'axis',
  },
  yAxis: {
    show: false,

    type: 'value',
    axisLabel: {

      textStyle: {
        color: '#8DA2C4'
      }
    },
    axisLine: {
      lineStyle: {
        color: '#8DA2C4'
      }
    },
  },
  series: [{
    name: '温度',
    data: [820, 932, 901, 934, 1290, 1330, 1320],
    type: 'line',
    areaStyle: {},
    smooth: true,
    itemStyle: {
      normal: {
        color: new echarts.graphic.LinearGradient(
          0, 0, 0, 1,
          [{
              offset: 0,
              color: '#4F7DCCFF'
            },
            {
              offset: 1,
              color: '#4F7DCC00'
            }
          ]
        ),
        lineStyle: {
          color: "#8DA2C4",
        }
      }
    },
    markLine: {
      itemStyle: {
        normal: {
          borderWidth: 1,
          lineStyle: {
            color: '#8DA2C4',
            width: 2
          },
        }

      },
      data: [
        // {type: 'max', name: '最高',label:{formatter:'最高:' + max}, symbol:'none'},
        // {type: 'min', name: '最低'},

        [{
          symbol: 'none',
          x: '80%',
          yAxis: 'max'
        }, {
          symbol: 'none',
          label: {
            normal: {
              position: 'start',
              formatter: '最高: ' + max,
              color: '#8DA2C4',
            }
          },
          type: 'max',
          name: '最高点',
        }],
        [{
          symbol: 'none',
          x: '80%',
          yAxis: 'min',
        }, {
          symbol: 'none',
          label: {
            normal: {
              position: 'start',
              formatter: '最低: ' + min,
              color: '#8DA2C4',
            }
          },
          type: 'min',
          name: '最低点'
        }]
      ]
    }
  }]
};


//显示数据内最高与最低点

/*markLine: {
  data: [
    [{
      symbol: 'none',
      x: '80%',
      yAxis: 'max'
    }, {
      symbol: 'none',
      label: {
        normal: {
          position: 'start',
          formatter: '最高:' + max,
          color: '#8DA2C4'
        }
      },
      type: 'max',
      name: '最高点',
    }],
    [{
      symbol: 'none',
      x: '80%',
      yAxis: 'min',
    }, {
      symbol: 'none',
      label: {
        normal: {
          position: 'start',
          formatter: '最低:' + min,
          color: '#8DA2C4'
        }
      },
      type: 'min',
      name: '最低点'
    }]
  ]
}*/


// {type: 'max', name: '最高',label:{formatter:'最高:' + max}, symbol:'none'},
// {type: 'min', name: '最低'},

